package com.eat.fish_service.controller.wx;

import com.eat.common_utils.R;
import com.eat.fish_service.service.EquipmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author LWB
 * @create 2022-03-29 19:11
 */

@RestController("wxEquipmentController")
@RequestMapping("/wx/equipment")
@Api(tags = "微信端设备管理")
@CrossOrigin
public class EquipmentController {


    @Autowired
    private EquipmentService equipmentService;

    //根据用户id查询专家问诊数据
    @ApiOperation(value = "根据鱼缸id返回所有该鱼缸的设备")
    @GetMapping("getEquipment/{aquariumId}")
    public R getEquipment(@PathVariable @ApiParam(name = "aquariumId", value = "鱼缸Id", required = true) String aquariumId) {
        return equipmentService.getEquipment(aquariumId);
    }
}
